package com.nexus.all.model;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.nexus.database.config.ListToStringHandler;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 笔记标题分词表
 *
 * @ClassName: NoteWord
 * @Author: ZZYR
 * @Date: 2024/2/26  9:24
 * @Version 1.0.0
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString(callSuper = true)
@TableName(value = "nexus_note_word", autoResultMap = true)
public class NoteWord {

    public static final LambdaQueryWrapper<NoteWord> gw() {
        return new LambdaQueryWrapper<>();
    }

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 笔记关键词
     */
    @TableField(value = "note_word")
    private String noteWord;


    /**
     * 笔记ids
     */
    @TableField(value = "note_ids", typeHandler = ListToStringHandler.class)
    private List<Long> noteIds;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    /**
     * 是否删除
     */
    @TableLogic
    @TableField(value = "is_deleted")
    private Boolean isDeleted;

}
